Skip to content

SPIKE: Protocol 28 (CAP-0084) - #552

Draft
sisuresh wants to merge 6 commits into
stellar:mainfrom
sisuresh:p28-cap-0084
Draft

SPIKE: Protocol 28 (CAP-0084)#552
sisuresh wants to merge 6 commits into
stellar:mainfrom
sisuresh:p28-cap-0084

Conversation

@sisuresh

@sisuresh sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Regenerates rs-stellar-xdr XDR for Protocol 28 / CAP-0084 (Muxed Contract Addresses).

Changes

Reviewer flag

  • ScAddress::MuxedContract Display returns Err — muxed contract addresses have no strkey encoding yet (stellar-strkey ≤0.0.18). Needs a human decision on the strkey format. FromStr is correct by omission (no muxed-contract Strkey variant).

CI note

  • build / test do not run on this branch: prepare expands the cargo-hack powerset to 224 feature combinations, so the build (2 × 225) and test (2 × 224) matrices are ~450 jobs each — over GitHub's hard 256-jobs-per-matrix limit, so neither job spawns and the complete aggregator goes red. main is at 112 combinations (458 total jobs) and stays under the cap; adding the third cap_* feature doubles it. Needs a matrix-sharding change in .github/workflows/rust.yml (e.g. split the feature list across two test/build job pairs) before this branch can get a real powerset signal. generate, fmt, readme, prepare all pass.

Upstream

  • SPIKE: Protocol 28 (CAP-0084) stellar-xdr#307merged (squashed onto main as 13fc2c3). This branch is now pinned at that canonical commit rather than the PR branch head 341179e, which the squash left unreachable from main. The .x tree is byte-identical between the two, so the re-pin changed only the submodule pointer and xdr-version — no generated-code diff.

Deferred

  • Cascade the new branch head to the downstream SPIKE PRs that pin this branch by rev (rs-soroban-env#1700 → rs-soroban-sdk#1924 → stellar-core#5337 → …).

Pinned to stellar-xdr#307 head 787382ef2099cca168ca1cb282730d6b7b9e2f16.
@sisuresh

sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

sisuresh added 5 commits July 20, 2026 16:47
# Conflicts:
#	Cargo.toml
#	src/lib.rs
#	xdr
#	xdr-version
stellar/stellar-xdr#307 merged (squash) as 13fc2c3 on main, so pin the
submodule + xdr-version at the canonical commit instead of the PR branch
head 341179e (which is not an ancestor of main after the squash).

The .x tree is byte-identical between the two commits, so `make generate`
produces no change to the generated Rust or JSON schemas.
@sisuresh

Copy link
Copy Markdown
Contributor Author

Heads up: #565 (the CAP-0083/0085 ungate) repins the xdr submodule past #307, which forces it to declare cap_0084_muxed_contract and carry the generated muxed-contract types plus the Display arm — copied verbatim from here. Once #565 lands, this PR is left with little beyond a rebase.

One blocker surfaced by Copilot on #565 that belongs here: with the feature enabled, ScAddress::MuxedContract cannot serialize, because ScAddress derives SerializeDisplay/DeserializeFromStr and the Display arm returns fmt::Error. There is no fix available yet — stellar-strkey has no muxed-contract variant, and CAP-0084 defers the normative encoding to SEP-23. Worth treating as a gate on enabling cap_0084_muxed_contract anywhere.

kanwalpreetd pushed a commit to kanwalpreetd/rs-stellar-xdr that referenced this pull request Aug 20, 2026
* Ungate CAP-0083 and CAP-0085, repin xdr to 9c9c145

Repins the xdr submodule to stellar-xdr main (stellar/stellar-xdr#311),
which removes the CAP_0083 and CAP_0085_EXECUTABLE_REF ifdefs, and drops
the matching cap_0083 / cap_0085_executable_ref crate features. Their
types are now generated unconditionally.

Also drops the two hand-written gates on those features: the
VERSION.features list in lib.rs and the ScVal::ExecutableTag arm in
scval_validations.rs, which would otherwise leave the match
non-exhaustive.

The repin also crosses stellar/stellar-xdr#307, so the .x now carries
CAP_0084_MUXED_CONTRACT ifdefs. That forces a cap_0084_muxed_contract
feature to be declared (generated code cfgs on it) plus a Display arm
for ScAddress::MuxedContract; both are taken verbatim from the in-flight
SPIKE stellar#552. The feature is off by default.

* Merge ExecutableTag into the trivially-valid arm

Now that the arm is unconditional it has a body identical to the
preceding one, which clippy::pedantic rejects (match_same_arms).

* update comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant